package caculate.strSearch;

/**
 * @program: rocsun
 * @description:
 * @author: yx.guo
 * @create: 2025-02-28 12:33
 **/
public abstract class StrMethod {
    protected String str;
    protected String pattern;

    protected int sLen;
    protected int pLen;

    public StrMethod(String str, String pattern) {
        this.str = str;
        this.pattern = pattern;
        this.sLen = str.length();
        this.pLen = pattern.length();
    }

    public int search() {
        return searchStr();
    }

    protected abstract int searchStr();

}
